package com.ostrich.a2104shopping.ui.home.room;

import com.ostrich.a2104shopping.ui.home.entity.GoodsEntity;

import java.util.List;

import androidx.room.Dao;
import androidx.room.Insert;
import androidx.room.OnConflictStrategy;
import androidx.room.Query;

/**
 * @Author : yaotianxue
 * @Time : On 2023/10/6 10:56
 * @Description : GoodsDao
 */
@Dao
public interface GoodsDao {
    @Insert(onConflict = OnConflictStrategy.REPLACE)
    void insertAll(List<GoodsEntity> list);

    @Query("select * from goods where goods_desc like '%'||:keywords||'%'")
    List<GoodsEntity> select(String keywords);

}
